<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <button onclick="fetchLargeFile()">发起请求</button>
</body>
<script>
    async function fetchLargeFile() {
        const response = await fetch('https://api.vvhan.com/api/hotlist/bili');
        const reader = response.body.getReader();
        const decoder = new TextDecoder();
        let string = '';
    
        while (true) {
            const { done, value } = await reader.read();
            if (done) {
                break;
            }
            string += decoder.decode(value, {stream: true});
        }
        string += decoder.decode();
        console.log(string);
    }

</script>
</html>